#include <keyboard.h>
#include <screen.h>
#include <sched.h>
#include <users.h>

int Enter_in_System ()
{
	for (;;)
	{
		int ret;
		char user [256], passwd [256];
		kprintf ("Login: ");
		in_string (user, 256);
		kprintf ("Password: ");
		in_string_passwd (passwd, 256);
		ret = login (user, passwd);
		if (ret > 0)
			switch_task ();
		if (ret == -3)
			return 0;
		if (ret == -4)
			return 1;
		if (ret == -1 || ret == -2)
			kprintf ("Incorrect username or password...\n");
	}
}
